package org.yellow.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.yellow.backend.pojo.Appointment;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Repository
public interface appointmentMapper extends BaseMapper<Appointment> {
    @Update("update appointments set status = 'Confirmed' where appointment_id=#{id}")
    void updateStatusById(int id);


    @Select("select appointment_id from appointments where patient_id=#{patientId}")
    Long selectIdByPatientId(Long patientId);
}
